package com.cc.entity;

import java.util.List;
import java.util.Map;

public class User {

    private String name;
    private int age;

    private Dog dog;

    // 数组
    private String[] arr;

    // List集合
    private List<String> list;

    private List<Dog> dogs; // ?

    // Map集合
    private Map<String, String> map;

    private Map<String, Dog> dogMap;// ?
    // 生命周期初始化方法
    public void setup() {
           System.out.println("开始对User类对象，进行业务初始化了.......");
    }

    // 生命周期销毁方法
    public void clearup() {
        System.out.println("开始对User类对象，进行销毁前的操作了.......");
    }

    public User() {
    }

    public User(Dog dog) {
        this.dog = dog;
    }

    public User(int ag, Dog dg) {
        this.dog = dg;
        this.age = ag;
    }

    public User(int age, String name) {
        this.age = age;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "User [name=" + name + ", age=" + age + ", dog=" + dog + "]";
    }

    public String show() {
        return "User [name=" + name + ", age=" + age + ",\n dog=" + dog + "，\narr=" + arr + ",\nlist=" + list
                + ",\ndogs=" + dogs + ",\nmap=" + map + ",\ndogMap=" + dogMap + "]";
    }

    public Dog getDog() {
        return dog;
    }

    public void setDog(Dog dog) {
        this.dog = dog;
    }

    public String[] getArr() {
        return arr;
    }

    public void setArr(String[] arr) {
        this.arr = arr;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    public List<Dog> getDogs() {
        return dogs;
    }

    public void setDogs(List<Dog> dogs) {
        this.dogs = dogs;
    }

    public Map<String, String> getMap() {
        return map;
    }

    public void setMap(Map<String, String> map) {
        this.map = map;
    }

    public Map<String, Dog> getDogMap() {
        return dogMap;
    }

    public void setDogMap(Map<String, Dog> dogMap) {
        this.dogMap = dogMap;
    }

}
